The demand for digital video products continues to increase. Some examples of applications for digital video include video communication, security and surveillance, industrial automation, and entertainment (e.g., DV, HDTV, satellite TV, set-top boxes, Internet video streaming, video gaming devices, digital cameras, cellular telephones, video jukeboxes, high-end displays and personal video recorders). Further, video applications are becoming increasingly mobile as a result of higher computation power in handsets, advances in battery technology, and high-speed wireless connectivity.
Video compression, i.e., video coding, is an essential enabler for digital video products as it enables the storage and transmission of digital video. In general, current video coding standards define video compression techniques that apply prediction, transformation, quantization, and entropy coding to sequential blocks of pixels, i.e., macroblocks, in a video sequence to compress, i.e., encode, the video sequence. A macroblock is defined as a 16×16 rectangular block of pixels in a frame or slice of a video sequence where a frame is defined to be a complete image captured during a known time interval.
A quantization parameter (QP) may be used to modulate the step size of the quantization for each macroblock. For example, in H.264/AVC, quantization of a transform coefficient involves dividing the coefficient by a quantization step size. The quantization step size, which may also be referred to as the quantization scale, is defined by the standard based on the QP value, which may be an integer within some range 0 . . . 51. A step size for a QP value may be determined, for example, using a table lookup and/or by computational derivation.
The quality and bit rate of the compressed bit stream is largely determined by the QP value selected for quantizing each macroblock. That is, the quantization step size (Qs) used to quantize a macroblock regulates how much spatial detail is retained in a compressed macroblock. The smaller the Qs, the more retention of detail and the better the quality but at the cost of a higher bit rate. As the Qs increases, less detail is retained and the bit rate decreases but at the cost of increased distortion and loss of quality.